<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	if (session.getAttribute("id") == null
			|| session.getAttribute("password") == null)
		out
				.print("<script>alert('请先登录！');window.location.href='login.jsp'</script>");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
.filedset form {
margin-top:40px; 
margin-left:350px;
}
</style>
<script type="text/javascript">
function check()
{
var old=document.form.old.value;
var new1=document.form.new1.value;
var new2=document.form.new2.value;
if(old==""||new1==""||new2=="")
{
	alert("密码框不能为空！");
	return;
}
else if(new1!=new2)
{
    alert("两次输入的新密码不一致！");
}
else
{
	form.submit();
}
}
</script>
</head>
<body>
<fieldset class="filedset">
<legend>修改密码</legend>
<form name="form" method="post" action="update_password_do.jsp" >   
			        原密码：<input type="password" name="old" id="old" size="30" style="margin-top:20px;"/><br/>
			          新密码：<input type="password" name="new1" id="new1" size="30" style="margin-top:20px;" /><br/>
			          新密码：<input type="password" name="new2"  id="new2" size="30" style="margin-top:20px;"/><br/>
              <input  type="submit" value="确定" onClick="check()" style="background:url(../images/button.gif) no-repeat; margin-left:90px; border:0px; height:28px; width:62px; margin-top:20px;"/>
              <input  type="reset"  value="重置" style="background:url(../images/button.gif) no-repeat;width:10px;margin-left:20px; border:0px; height:28px; width:62px; margin-top:20px;"/>
         
</form>
</fieldset>
</body>
</html>